import cv2 as cv
import matplotlib.pyplot as plt


img=cv.imread("G:\\Learn\\CSDN\\Work\\lena.jpg")
source=cv.cvtColor(img,cv.COLOR_BGR2RGB)
result= cv.blur(source,(5,5))
titles=['Source Image','Blur Image']
images=[source,result]
for i in range(2):
    plt.subplot(1,2,i+1),plt.imshow(images[i],'gray')
    plt.title(titles[i])
    plt.xticks([]),plt.yticks([])
plt.show()


'''
img=cv.imread("G:\Learn\CSDN\Work\\lena.jpg")
source=cv.cvtColor(img,cv.COLOR_BGR2RGB)

result=cv.GaussianBlur(source,(5,5),0)

titles=["Source Image",'GaussianBlur Image']
images=[source,result]
for i in range(2):
    plt.subplot(1,2,i+1),plt.imshow(images[i],'gray')
    plt.title(titles[i])
    plt.xticks([]),plt.yticks([])
plt.show()
'''

'''
img=cv.imread('G:\Learn\CSDN\Work\\lena.jpg')
source=cv.cvtColor(img,cv.COLOR_BGR2RGB)

result=cv.medianBlur(source,5)
titles=["Source Image","MedianBlur Image"]
images=[source,result]
for i in range(2):
    plt.subplot(1,2,i+1),plt.imshow(images[i],'gray')
    plt.title(titles[i])
    plt.xticks([]),plt.yticks([])
plt.show()
'''
